package com.yunduo.service.impl;

import com.yunduo.entity.ShopGoods;
import com.yunduo.mapper.ShopGoodsMapper;
import com.yunduo.service.ShopGoodsService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author ChengXin
 * @since 2023-07-22
 */
@Service
public class ShopGoodsServiceImpl extends ServiceImpl<ShopGoodsMapper, ShopGoods> implements ShopGoodsService {

    @Resource
    private ShopGoodsMapper shopGoodsMapper;

    @Override
    public boolean changStateById(String id,int value) {
        return shopGoodsMapper.updateStateById(id,value);
    }

    @Override
    public boolean deleteByShopAndGoodIds(String shopId, String[] goodIds) {
        return shopGoodsMapper.removeByShopAndGoodIds(shopId,goodIds);
    }
}
